﻿using UnityEngine;
using UnityEditor;
using Unity.Entities;
using Unity.Transforms;
using Unity.Mathematics;

//public class MoveSystem : ComponentSystem
//{

//    struct Data
//    {
//        public readonly int Length;

//        public ComponentDataArray<Position> PosArray;
//    }

//    [Inject] Data DataArray;

//    protected override void OnUpdate()
//    {
//        var horizontal = Input.GetAxis("Horizontal");
//        var vertical = Input.GetAxis("Vertical");

//        for (int i = 0; i < DataArray.Length; i++)
//        {
//            DataArray.PosArray[i] = new Position() { Value = DataArray.PosArray[i].Value + new float3(horizontal, 0, vertical) * Time.deltaTime * 5 };
//        }
//        //PostUpdateCommands.DestroyEntity(new Entity());
//    }
//}